package com.qf.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 千锋健哥
 */
@TableName("sys_menu")
public class Menu implements Serializable {

    //主键ID
    private Long id;
    //菜单名称
    private String name;
    //创建时间
    private Date createTime;
    //父级菜单ID
    private Long parentId;
    /**
     * 菜单URL,类型：
     *     1.普通页面（如用户管理， /sys/user）
     *     2.嵌套完整外部页面，以http(s)开头的链接
     *     3.嵌套服务器页面，使用iframe:前缀+目标URL(如SQL监控， iframe:/druid/login.html,
     *     iframe:前缀会替换成服务器地址)
     */
    private String url;
    //授权(多个用逗号分隔，如：sys:user:add,sys:user:edit)
    private String perms;
    //类型   0：目录   1：菜单   2：按钮
    private Integer type;
    //头像
    private String icon;
    //排序
    private Integer orderNum;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getPerms() {
        return perms;
    }

    public void setPerms(String perms) {
        this.perms = perms;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    @Override
    public String toString() {
        return "Menu{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", createTime=" + createTime +
                ", parentId=" + parentId +
                ", url='" + url + '\'' +
                ", perms='" + perms + '\'' +
                ", type=" + type +
                ", icon='" + icon + '\'' +
                ", orderNum=" + orderNum +
                '}';
    }

}
